import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listManage(query) {
  return request({
    url: '/contract/manage/list',
    method: 'get',
    params: query
  })
}
export function listManageAll(query) {
  return request({
    url: '/contract/manage/listAll',
    method: 'get',
    params: query
  })
}

export function listProjectId(query) {
  return request({
    url: '/contract/manage/listProject/',
    method: 'get',
    params: query
  })
}

export function getContractInfo(query) {
  return request({
    url: '/contract/manage/getContractInfo',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getManage(id) {
  return request({
    url: '/contract/manage/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addManage(data) {
  return request({
    url: '/contract/manage',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateManage(data) {
  return request({
    url: '/contract/manage',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function removeRelations(data) {
  return request({
    url: '/contract/manage/removeRelations',
    method: 'post',
    data: data
  })
}
// 删除【请填写功能名称】
export function delManage(id) {
  return request({
    url: '/contract/manage/' + id,
    method: 'delete'
  })
}
// 查询合同总数
export function contractTotal(query) {
  return request({
    url: '/contract/manage/contractTotal',
    method: 'get',
    params: query
  })
}

// 收入合同数量
export function incomeContractNum(query) {
  return request({
    url: '/contract/manage/incomeContractNum',
    method: 'get',
    params: query
  })
}

// 支出合同数量
export function expenditureContractNum(query) {
  return request({
    url: '/contract/manage/expenditureContractNum',
    method: 'get',
    params: query
  })
}

// 收入合同金额
export function incomeContractAmount(query) {
  return request({
    url: '/contract/manage/incomeContractAmount',
    method: 'get',
    params: query
  })
}

// 支出合同金额
export function expenditureContractAmount(query) {
  return request({
    url: '/contract/manage/expenditureContractAmount',
    method: 'get',
    params: query
  })
}

// 1 实际回款 2计划回款
export function collectionAndPlanData(query) {
  return request({
    url: '/contract/manage/collectionAndPlanData',
    method: 'get',
    params: query
  })
}

//  1 实际付款 2计划付款
export function paymentAndPlanData(query) {
  return request({
    url: '/contract/manage/paymentAndPlanData',
    method: 'get',
    params: query
  })
}

//发票金额
export function invoiceData(query) {
  return request({
    url: '/contract/manage/invoiceData',
    method: 'get',
    params: query
  })
}
